package acheng1314.cn.a3dbuild2.view.activity;


import android.graphics.Bitmap;

import com.acheng.achengutils.mvp.view.BaseActivity;
import com.acheng.achengutils.utils.ImageUtils;

import java.io.File;

import acheng1314.cn.a3dbuild2.MyApplication;
import acheng1314.cn.a3dbuild2.R;
import acheng1314.cn.a3dbuild2.view.activity.presenter.UploadPicActivityPresenter;
import acheng1314.cn.a3dbuild2.view.activity.viewcontroller.UploadPicActivityModel;

public class UploadPicActivity extends BaseActivity<UploadPicActivityPresenter, UploadPicActivityModel> implements UploadPicActivityModel {

    @Override
    protected UploadPicActivityPresenter initPresenter() {
        return new UploadPicActivityPresenter(this);
    }


    @Override
    protected void initEvent() {

    }

    @Override
    protected void initView() {
        String backUrl = getIntent().getStringExtra("url");
        Bitmap bg = getIntent().getExtras().getParcelable("data");
        File file = ImageUtils.bitmap2SamllFile(getContext(), bg, 400, 800, false);
        MyApplication.getInstance().outLog("输出", file.getName() + "\n" + file.getUsableSpace());

    }

    @Override
    protected int setLayoutId() {
        return R.layout.activity_upload_pic;
    }
}
